//
//  M.m
//  p2p
//
//  Created by mokai on 14-7-29.
//  Copyright (c) 2014年 cloudyoo. All rights reserved.
//

#import "M.h"

@implementation M

//可变参数转换成NSArray
+(NSMutableArray *)vaList2Array:(id)list,...NS_REQUIRES_NIL_TERMINATION{
    NSMutableArray *array = [[NSMutableArray alloc] init];
    if (list) {
        va_list args;
        va_start(args, list);
        for (NSString *arg = list; arg != nil; arg = va_arg(args, NSString* ))
        {
            [array addObject:arg];
        }
        va_end(args);
    }
    
    return array;
}


@end
